unsigned long pci_mem_start = PCI_MEM_START;
unsigned long pci_mem_end = PCI_MEM_END;
-static enum { VGA_none, VGA_std, VGA_cirrus } virtual_vga = VGA_none;
+static enum { VGA_none, VGA_std, VGA_cirrus, VGA_pt } virtual_vga = VGA_none;
static void init_hypercalls(void)
{
case 0x0300:
if ( (vendor_id == 0x1234) && (device_id == 0x1111) )
virtual_vga = VGA_std;
- if ( (vendor_id == 0x1013) && (device_id == 0xb8) )
+ else if ( (vendor_id == 0x1013) && (device_id == 0xb8) )
virtual_vga = VGA_cirrus;
+ else
+ virtual_vga = VGA_pt;
break;
case 0x0680:
/* PIIX4 ACPI PM. Special device with special PCI config space. */
vgabios_stdvga, sizeof(vgabios_stdvga));
vgabios_sz = round_option_rom(sizeof(vgabios_stdvga));
break;
+ case VGA_pt:
+ printf("Loading VGABIOS of passthroughed gfx ...\n");
+ vgabios_sz =
+ round_option_rom((*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
+ break;
default:
printf("No emulated VGA adaptor ...\n");
break;
'pci_msitranslate': int,
'pci_power_mgmt': int,
'xen_platform_pci': int,
+ "gfx_passthru": int,
}
# Xen API console 'other_config' keys.
dmargs = [ 'boot', 'fda', 'fdb', 'soundhw',
'localtime', 'serial', 'stdvga', 'isa',
- 'acpi', 'usb', 'usbdevice' ]
+ 'acpi', 'usb', 'usbdevice', 'gfx_passthru' ]
for a in dmargs:
v = vmConfig['platform'].get(a)
fn=set_value, default=None,
use="""Should the device model use SDL?""")
+gopts.var('gfx_passthru', val='',
+ fn=set_value, default=None,
+ use="""Passthrough graphics card?""")
+
gopts.var('opengl', val='',
fn=set_value, default=None,
use="""Enable\Disable OpenGL""")
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate',
- 'vpt_align', 'pci_power_mgmt', 'xen_platform_pci' ]
+ 'vpt_align', 'pci_power_mgmt', 'xen_platform_pci',
+ 'gfx_passthru' ]
for a in args:
if a in vals.__dict__ and vals.__dict__[a] is not None: